package com.nifostasky;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;

//DataSourceAutoConfiguration会自动加载.可以排除此类的自动配置，在启动类中加入排除自动加载exclude;
//
@SpringBootApplication(exclude= {DataSourceAutoConfiguration.class},scanBasePackages = {"com.nifostasky"})
//开启Eureka注册服务客户端
@EnableEurekaClient
//对应feign接口所在的包
@EnableFeignClients(basePackages = {"com.nifostasky.config","com.nifostasky.config.fallback"})
//开启熔断器功能
@EnableCircuitBreaker
public class ConsumerApp {
    public static void main(String[] args) {
        SpringApplication.run(ConsumerApp.class,args);
    }
}
